package chu.dejian.conf;

import android.app.Application;

import com.igexin.sdk.PushManager;

import chu.dejian.db.DBHelper;
import im.fir.sdk.FIR;
import com.baidu.mapapi.SDKInitializer;
import com.sam.ble.base.application.BLEBRInterfApplication;

public class BLEApplication extends BLEBRInterfApplication {
    private static BLEApplication instance;

    public synchronized static BLEApplication getInstance() {
        if (instance == null) {
            instance = new BLEApplication();
        }
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        SDKInitializer.initialize(getApplicationContext());
        FIR.init(this);
        BLEPreference.getInstance().init(getApplicationContext());
        PushManager.getInstance().initialize(getApplicationContext());
        DBHelper.init(getApplicationContext());
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
//        BLEDeviceService.scanLeDevice(false, null);
    }
}